<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSystemFiles extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('system_files', function (Blueprint $table) {
            $table->id();
            $table->integer('storage_id')->default(0)->comment('仓储ID');
            $table->string('name')->comment('文件名');
            $table->string('path')->comment('文件地址');
            $table->string('url')->comment('文件路径');
            $table->string('size')->comment('文件大小');
            $table->string('mime')->comment('文件类型');
            $table->timestamp('created_at')->useCurrent()->comment('创建时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('system_files');
    }
}
